package com.myfirstactivity.setting;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.Locale;


import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ListView;
import android.widget.TextView;


import com.myfirstactivity.R;
import com.myfirstactivity.Start;
import com.myfirstactivity.fixguide.FixGuide;
import com.myfirstactivity.menu.FeedbackActivity;
import com.myfirstactivity.menu.InstructionActivity;
public class SettingActivity extends Activity{

//private int imageID = R.drawable.rightarow;
private TextView feekback_tv;
private TextView about_tv;
private TextView language_tv;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.setting_1);
		feekback_tv = (TextView)this.findViewById(R.id.setting_feekback);
		about_tv = (TextView)this.findViewById(R.id.setting_about);
		language_tv = (TextView)this.findViewById(R.id.setting_language);
		language_tv.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				
				startActivity(new Intent(SettingActivity.this, LanguageSettingActivity.class));
				
			}
			
		});
		about_tv.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				
				startActivity(new Intent(SettingActivity.this, InstructionActivity.class));
				
			}
			
		});
		feekback_tv.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				
				startActivity(new Intent(SettingActivity.this, FeedbackActivity.class));
				
			}
			
		});
//		setContentView(R.layout.setting);
//	
//		ArrayList<HashMap<String, Object>> list = new ArrayList<HashMap<String, Object>>();
//		HashMap<String, Object> map1 = new HashMap<String, Object>();
//		HashMap<String, Object> map2 = new HashMap<String, Object>();
//		HashMap<String, Object> map3 = new HashMap<String, Object>();
//		map1.put("user_name", getResources().getString(R.string.language));
//		map1.put("user_ip", imageID);
//		map2.put("user_name", "lisi");
//		map2.put("user_ip", imageID);
//		map3.put("user_name", "wangwu");
//		map3.put("user_ip", imageID);
//		list.add(map1);
//		list.add(map2);
//		list.add(map3);
//		MyAdapter listAdapter = new MyAdapter(this, list,
//				R.layout.user, new String[] { "user_name", "user_ip" },
//				new int[] { R.id.user_name,R.id.user_ip});
//		setListAdapter(listAdapter);
	}
//	protected void onListItemClick(ListView l, View v, int position, long id) {
//		// TODO Auto-generated method stub
//		super.onListItemClick(l, v, position, id);
//		System.out.println("id----------------" + id);
//		System.out.println("position----------" + position);
//		if(position==0){
//			startActivity(new Intent(SettingActivity.this,LanguageSettingActivity.class));
//			
//		}
//	}

		
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		 if (keyCode == KeyEvent.KEYCODE_BACK){
			
//			 	Intent intent = new Intent();
//				intent.setClass(SettingActivity.this, Start.class);
			
				finish();
				//SettingActivity.this.startActivity(intent);
				 
		 }
		 return true;
	}
}
